home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
FREENET
/
DEVOS
/
TIMER.ZIP
/
!ReadMe1st
next >
Wrap
Text File
|
1996-01-12
|
2KB
|
58 lines
SetTimer
--------
Syntax: *SetTimer <varname>
Create a timer in the given system variable. Every time the variable is read,
it will produce a string representing the time since the variable was
created. The timer resolution is in centiseconds and it will run correctly
for 200 years (or the next machine reboot).
One example of the use of SetTimer is the implementation of an 'UpTime'
command. Like on Unix systems, UpTime will show the time since the last
system start.
SetTimer Sys$UpTime
SetMacro Alias$UpTime Echo <Sys$UpTime>
UnsetCV
-------
Syntax: *UnsetCV <varname>
The normal *Unset command will delete a system variable, this does however
not work for code variables like the ones SetTimer produces. This utility
will delete code variables as well. The given variable name may be wildcarded
with * or # chars to remove a set of variables, ie. *UnsetCV Timer*
These tools are related to FreeDial since I wrote them to generate the Dial
Logfiles people requested. The following examples show how you can use these
tools in the FreeDial script files:
Add this to the end of the script file from which you want to log on line
time. The script will not reach these commands when the connection fails. The
next version of FreeDial will probably export Inet$ProviderPhoneNumber as
well so you can include that too.
*Echo Online at <Sys$Date> <Sys$Time> { >> <FreeUser$Dir>.DialLog }
*SetTimer Inet$OnlineTime
Add this to FreeNet's ShutDown Obey file which ends the connection:
Echo Offline at <Sys$Date> <Sys$Time> after <Inet$OnlineTime> { >> <FreeUser$Dir>.DialLog }
UnsetCV Inet$OnlineTime
The SetTimer and UnsetCV utilities must of course be placed in a directory on
your Run$Path like $.Library for this to work.
SetTimer, UnsetCV and their source code files are public domain, use it for
whatever you like.
Gert-Jan de Vos, 11 Jan 1996
Benedenbeekloop 18
5662 HL Geldrop
the Netherlands
+31 40 2858590
devos@eb.ele.tue.nl